//========================================================================
// *作者：海盗猫  主页：ilplay.com
// *脚本：UIEditorGUILayout
// *描述：通用样式脚本
// *?2021 MYJL . All rights reserved.
//* ======================================================================
using UnityEngine;
namespace HDMCode.Hotfix
{
    public class UIEditorGUILayout
    {
        public static Rect targetTampRect { get; set; }
        public Rect defaultRect { get; set; }
        public float width { get; set; }
        public float padding { get; set; } = 10;
        private float indexWidth { get; set; } = 30;
        private float targetWidth { get => (width - indexWidth - padding) / 3; }
        private float componentsWidth { get => targetWidth * 2; }
        public UIEditorGUILayout(Rect defaultRect, float width)
        {
            this.defaultRect = defaultRect;
            this.width = width;
        }
        public Rect indexRect { get => new Rect(defaultRect.x, defaultRect.y, indexWidth, defaultRect.height); }
        public Rect targetRect { get => new Rect(defaultRect.x + padding + indexWidth, defaultRect.y, targetWidth, defaultRect.height); }
        public Rect componentsRect { get => new Rect(defaultRect.x + padding * 2 + indexWidth + targetWidth, defaultRect.y, componentsWidth - padding, defaultRect.height); }

    }
}